
Partial Class Case_caseUserInfo
    Inherits System.Web.UI.UserControl
    Implements IPermission

    Public ReadOnly Property SectionName() As String Implements IPermission.SectionName
        Get
            Return "User Info"
        End Get
    End Property

    Public ReadOnly Property ControlCollection() As System.Web.UI.ControlCollection Implements IPermission.ControlCollection
        Get
            Return Me.Controls
        End Get
    End Property

    Public ReadOnly Property EntityPermissionType() As Cdm.DataCore.UserSecurity.Permission.PermissionType Implements IPermission.EntityPermissionType
        Get
            Return Cdm.DataCore.UserSecurity.Permission.PermissionType.CaseUserInfo
        End Get
    End Property

    Public Property PrimaryObject() As Cdm.DataCore.ConfigurableObject Implements IPermission.PrimaryObject
        Get
            Dim pg As IPermission
            pg = Me.Page
            Dim pt As Cdm.DataCore.Entities.Participant
            pt = pg.PrimaryObject
            Return pt
        End Get
        Set(ByVal value As Cdm.DataCore.ConfigurableObject)
            EntityController.SetPagePropertiesFromObject(Me, True)
        End Set
    End Property

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        If Me.IsPostBack Then
            EntityController.SetPagePropertiesFromObject(Me, False)
        End If

    End Sub

    Public Sub SetUserNameAndPassword(ByVal userName As String, ByVal password As String)

        Me.PasswordInputControl.Value = password
        Me.UsernameInputControl.Value = userName

    End Sub

    Public Sub ResetControls() Implements IPermission.ResetControls

    End Sub

End Class
